﻿namespace TeamFoundationServerSensor {

    /// <summary>
    /// Summary description for EventSubscription
    /// </summary>
    public class EventSubscription {

        #region Fields
        // The ID of this event in the database;
        private int id;

        // Name of the event
        private string type;

        // Address that is waiting for the event.
        private string address;

        // XPath filter expression
        private string expression;
        #endregion

        /// <summary>
        /// Simple constructor for a type of event.
        /// </summary>
        /// <param name="type">The type of event that is being stored.</param>
        public EventSubscription(string type) {
            this.type = type;
        }

        #region Get and Set
        /// <summary>
        /// Get method for type.
        /// </summary>
        public string Type {
            get { return this.type; }
        }

        /// <summary>
        /// Get and set methods for address.
        /// </summary>
        public string Address {
            get { return this.address; }
            set { this.address = value; }
        }

        /// <summary>
        /// Get and set methods for expression.
        /// </summary>
        public string Expression {
            get { return this.expression; }
            set { this.expression = value; }
        }

        /// <summary>
        /// Get and set methods for ID.
        /// </summary>
        public int ID {
            get { return this.id; }
            set { this.id = value; }
        }
        #endregion
    }
}
